// 全局指令
const vueDirective = {
  // 防抖
  debounce: {
    inserted: function(el, binding) {
      // leading true 立即执行
      const executeFunction = _.debounce(binding.value, 1000, {
        leading: true,
      });
      el.addEventListener("click", executeFunction);
    },
  },
};
export default vueDirective;
